package com.hui.xiao.xiaohui.fragment;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/5/27.
 */
public class BookContent {
    public static class Book {
        public Integer id ;
        public String title;
        public String desc;

        public Book(Integer id, String title, String desc) {
            this.id = id;
            this.title = title;
            this.desc = desc;
        }

        @Override
        public String toString() {
            return title;
        }
    }

    public static List<Book> books = new ArrayList<>();
    public static Map<Integer, Book> bookMap = new HashMap<>();

    static {
        Book java = new Book(1, "java", "疯狂java");
        Book android = new Book(2, "android", "疯狂android");
        Book xml = new Book(3, "xml", "疯狂xml");

        books.add(java);
        bookMap.put(java.id, java);

        books.add(android);
        bookMap.put(android.id, android);

        books.add(xml);
        bookMap.put(xml.id, xml);
    }
}
